using NUnit.Framework;

using StructureMap.TypeMockAutoMockerTesting;

namespace StructureMap.TypeMockAutoMocker
{
	[TestFixture]
	public class ClassicAutoMockerWithConcreteClassUnderTestTester: ClassiAutoMockerTesterBase<ConcreteCutWithAbstractMock, ConcreteCutWithConcreteMock>
	{
		[Test]
		public void AConcretePartialMockShouldBehaveLikeAConcreteMock()
		{
			var autoMockerForPartial = createAutoMockerWithConcreteMock();
			autoMockerForPartial.PartialMockTheClassUnderTest();

			var autoMockerNonPartial = createAutoMockerWithConcreteMock();

			Assert.AreEqual(8, autoMockerNonPartial.ClassUnderTest.Get8(), "the original implementation should always be called on a non partial mock");
			Assert.AreEqual(autoMockerForPartial.ClassUnderTest.Get8(), autoMockerNonPartial.ClassUnderTest.Get8(), "a concrete partial mock should behave like a concrete non partial mock");
		}
	}
}